﻿Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Seuss.EnterpriseLibrary.BusinessLogic
Imports Seuss.EnterpriseLibrary.DataAccess
Imports System.Data
Imports System.Collections.Generic

Public Module FuncionesMovil
    Public Function CrearXMLTransaccion(ByVal Descripcion As String, ByVal Campos As String) As String

        Dim VXML As String
        Dim a As String() = Campos.Split(New Char() {"/"c})
        Dim s As String
        VXML = "<Transaccion>"
        VXML = VXML + "<Descripcion>" + Trim(Descripcion) + "</Descripcion>"
        For Each s In a
            If s.Trim().Length > 0 Then
                Dim c As String() = s.Split(New Char() {"|"c})
                Dim Campo As String = Trim(CStr(c(0)))
                Dim valor As String = Trim(CStr(c(1)))
                VXML = VXML + "<" + Trim(Campo) + ">" + Trim(valor) + "</" + Trim(Campo) + ">"
            End If
        Next
        VXML = VXML + "</Transaccion>"
        Return VXML
    End Function
End Module
